﻿using System;
using System.Collections.Generic;
using System.Web;

using System.Text;
using System.Web.UI;
using System.Web.Script.Serialization;

namespace VTNT.Presentation.Web.Mods.Core
{
    public class CAppEnvironment
    {
        public void RegisterPortalConfig(Page page)
        {
            CJson config = new CJson("VTNT Configuration", "VTNT", false);
            config.AddVariable("Web_Domain", CUrl.Domain);
            config.AddVariable("Web_HostName", CUrl.Host);

            config.AddVariable("Client_Key", CAppConfig.ClientKey);

            config.AddVariable("Service_Data", CAppConfig.ServiceData);
            page.ClientScript.RegisterClientScriptBlock(page.GetType(), "VTNT_scriptkey", config.ToString(), true);
        }
    }
}